Allow toggling the password entry visibility programmatically
authorEmmanuele Bassi <ebassi@gnome.org>
Thu, 15 Oct 2020 20:18:35 +0000 (21:18 +0100)
committerEmmanuele Bassi <ebassi@gnome.org>
Thu, 15 Oct 2020 23:34:01 +0000 (00:34 +0100)
We are going to need a method for toggling the visibility from the
accessibility layer.

gtk/gtkpasswordentry.c
gtk/gtkpasswordentryprivate.h

index 8d5de422b24bc938971ddce5c016d01eee3c0058..8ac1cd3ade97afcc9d522c4249202cfc06a4e9d4 100644 (file)
@@ -135,8 +135,14 @@ focus_changed (GtkWidget *widget)
   if (entry->keyboard)
     caps_lock_state_changed (entry->keyboard, NULL, widget);
 }
-static void
+
+/*< private >
+ * gtk_password_entry_toggle_peek:
+ * @entry: a #GtkPasswordEntry
+ *
+ * Toggles the text visibility.
+ */
+void
 gtk_password_entry_toggle_peek (GtkPasswordEntry *entry)
 {
   gboolean visibility;
index 2daaaba4fb564f00aabb475d4088e7a12583ad59..ad86f4e0204ab4bdda164599d4d3e867e30868e0 100644 (file)
@@ -27,4 +27,6 @@ G_BEGIN_DECLS
 
 GtkText *       gtk_password_entry_get_text_widget      (GtkPasswordEntry *entry);
 
+void            gtk_password_entry_toggle_peek          (GtkPasswordEntry *entry);
+
 G_END_DECLS